import React from 'react'
import ReactDOM from 'react-dom/client'
import './index.css'
import App from './App'
// 引入路由模块
import { BrowserRouter, Route, Routes } from 'react-router-dom'
import Login from './pages/Login'

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(
  <BrowserRouter>
    {/* 路由容器 */}
    <Routes>
      {/* 配置路由 */}
      <Route path="/" element={<Login />} />
      <Route path="/login" element={<Login />} />
      <Route path="/admin/*" element={<App />} />
    </Routes>
  </BrowserRouter>
)
